package main

//go:generate wire

import (
	"backend/cmd/command"
	"backend/config"
	"backend/internal/controller"
	"backend/internal/data"
	"backend/internal/router"
	"backend/internal/service"
	"backend/middleware"
	"backend/pkg/component"

	"github.com/google/wire"
	"go.uber.org/zap"
	"gopkg.in/natefinch/lumberjack.v2"
)

// wireApp 提供应用实例
func wireApp(conf *config.Configuration, loggerWriter *lumberjack.Logger, logger *zap.Logger) (*App, func(), error) {
	panic(
		wire.Build(
			data.ProviderSet,
			component.ProviderSet,
			service.ProviderSet,
			controller.ProviderSet,
			middleware.ProviderSet,
			router.ProviderSet,
			newHTTPServer,
			newApp,
		),
	)
}
func provideCommand(*config.Configuration, *lumberjack.Logger, *zap.Logger) (*command.Command, func(), error) {
	panic(wire.Build(data.ProviderSet, command.ProviderSet, command.NewCommand))
}
